chdkfandomcom-20200222-history
Grids
Grids :CHDK (build 136 or later) allows you to custom design your own composition grids. Small files with the naming convention of filename.grd may be saved in a CHDK/GRIDS/ sub-folder, and called up for use with the OSD Parameters menu option of "Grid Settings". ---- Graphic Commands :Format of grid file for CHDK: :@title :@line x0, y0, x1, y1, lineColor :@rect x0, y0, x1, y1, borderColor :@rectf x0, y0, x1, y1, borderColor, fillColor :@elps x0, y0, rx, ry, borderColor :@elpsf x0, y0, rx, ry, fillColor :All numbers can be either decimal or hexadecimal. :Drawing coordinates are all within a 360 (x) by 240 (y) pixel area, Upper-left corner is 0, 0 and lower-right is 359, 239 :Any lines which have an incorrect format are ignored. So, you can use comments in the grid-file. I suggest starting comment lines with symbol #, although it is unnecessary. : Color is the color number from current color palette (you can use the draw color palette in Misc. menu). Also, you can use hexadecimal values (as it is written in palette picker). For example, 15 -> 0x0F, 34 -> 0x22, and so on. : Some standard color values I used in CHDK: TRANSPARENT 0x00 WHITE 0x11 RED 0x22 GREY 0x3F ?? GREEN 0x55 BLUE_LT 0xDD YELLOW 0xEE BLACK 0xFF SEMITRANSPARENT 0x44 : 'elps' is ellipse, right. x0, y0 - center; rx, ry - two radiuses (See Ellipse; a&b on the picture). If rx equals ry, it will be a circle. : --GrAnd 19:23, 23 June 2007 (UTC) ---- Tutorial (needs to be added?) ---- User Contributions The 3:2 EVF/LCD dimensions do not correlate exactly to the 4:3 dimensions of the actual image You might, or will, have to adjust your cropping areas and guidelines accordingly. The easiest way that I found was to take an actual image taken from the camera and loading it into PhotoLine 32 editor. Then create a "lasso" in the exact proportions required (typing in the ratio in the lasso's tool options), and clicking on "proportional". Create a lasso to fill up the image from one border to another. Then create a new layer from that lasso (tool > lasso > convert layer to lasso), so I could see the new dimension outline when downsized. Downsize/Scale the whole document (not just a layer) to the dimensions of 360x240 with proportional OFF. Then measure how many pixels are left between the lasso layer and the original image's borders with any tool that shows pixel dimensions when used. That will be the amount to subtract from the corresponding EVF/LCD display borders. -- Golden Grids This layout expands on the more simple demo golden-ratio grids. It adds in the triangular ratios for all 4 corners as well as a smaller subset of spiraling rectangles denoting lobes of a golden-spiral. Suggested filename: "golden3.grd". The colors were chosen for an S3 IS, you may need to change the colors for yours. I left spaces between each batch of lines being drawn, each section being upper-left, upper-right, lower-left, and lower-right, in case you want to tweak them for position or color, it'll be easier to find each section. The blocks are: tic-tac-toe grid (4 lines, color 0x07), golden-triangles (8 lines, color 0x27), and then the spiraling rectangles (16 lines, color 0x05). Sample image: (adjusted a couple pixels for 4:3 to 3:2 ratio) @title Golden-Ratio Grids @line 0, 92, 359, 92, 0x07 @line 0, 148, 359, 148, 0x07 @line 137, 0, 137, 239, 0x07 @line 222, 0, 222, 239, 0x07 @line 0, 0, 137, 92, 0x27 @line 137, 0, 85, 92, 0x27 @line 359, 0, 222, 92, 0x27 @line 222, 0, 275, 92, 0x27 @line 0, 239, 137, 148, 0x27 @line 137, 239, 85, 148, 0x27 @line 359, 239, 222, 148, 0x27 @line 222, 239, 275, 148, 0x27 @line 85, 0, 85, 92, 0x05 @line 85, 57, 137, 57, 0x05 @line 105, 57, 105, 92, 0x05 @line 85, 70, 105, 70, 0x05 @line 275, 0, 275, 92, 0x05 @line 222, 56, 275, 56, 0x05 @line 255, 56, 255, 92, 0x05 @line 255, 70, 275, 70, 0x05 @line 85, 148, 85, 239, 0x05 @line 85, 183, 137, 183, 0x05 @line 105, 148, 105, 183, 0x05 @line 85, 170, 105, 170, 0x05 @line 275, 148, 275, 239, 0x05 @line 222, 183, 275, 183, 0x05 @line 255, 148, 255, 183, 0x05 @line 255, 170, 275, 170, 0x05 ---- -- 5 X 3.5 Crop (adjusted for 3:4 to 3:2 ratio) @title 5 x 3.5 Crop @rectf 0, 0, 359, 6, 0x03, 0x03 @rectf 0, 232, 359, 239, 0x03, 0x03 -- 7 X 5 Crop (adjusted for 3:4 to 3:2 ratio) @title 7 x 5 Crop @rectf 0, 0, 359, 4, 0x03, 0x03 @rectf 0, 234, 359, 239, 0x03, 0x03 -- 10 X 8 Crop (adjusted for 3:4 to 3:2 ratio) @title 10 x 8 Crop @rectf 0, 0, 10, 239, 0x03, 0x03 @rectf 349, 0, 359, 239, 0x03, 0x03 -- 16 X 9 Crop (adjusted for 3:4 to 3:2 ratio) @title 16 x 9 Crop @rectf 0, 0, 359, 28, 0x03, 0x03 @rectf 0, 210, 359, 239, 0x03, 0x03 -- 18 X 13 Crop (adjusted for 3:4 to 3:2 ratio) @title 18 x 13 Crop @rectf 0, 0, 359, 7, 0x03, 0x03 @rectf 0, 232, 359, 239, 0x03, 0x03 -- Square Crop (adjusted for 3:4 to 3:2 ratio) @title Square Crop @rectf 0, 0, 44, 239, 0x03, 0x03 @rectf 315, 0, 359, 239, 0x03, 0x03 ---- -- Night-Vision Protection In the past when using another digital camera for taking moon and aurora photos, or trying to get long exposures of constellations, I was frequently annoyed by how very bright the EVF display could get once my eyes became dark-adapted. Even though that camera has 3 levels of brightness to choose from, even the dimmest setting was way too bright. I even went so far as to custom-grind a glass ND-16 filter to fit into the eye-piece cup on the other camera. So I thought I'd try to see if the filled-rectangle grid function might help in this regard with Canon cameras. There's no guarantee this will be any improvement, I've not tried these for actual use, but after some short inside visual tests it appears these might actually help. You will of course have to turn off all your other On-Screen Display (OSD) items so they don't provide brighter areas, and turn down your EVF/LCD brightness to the dim setting to also help. When these grid files are on all your camera settings will not be visible except for very brief flashes while actually changing them. So that seems a plus right there. Anyway, see if these help: For this one I just chose the darkest transparent gray I could find: @title Night-vision Protect @rectf 0, 0, 359, 259, 0xf8, 0xf8 And this one uses the darkest transparent red out of the available palette colors: @title Night-vision Red @rectf 0, 0, 359, 259, 0x42, 0x42 I'm now wondering if a half-tone grid where every other line is black might be a better route to try. I'm just reluctant to type 120 or 180 lines of graphic commands for an experiment. :-) ----